A technique for extracting table ruled lines, ruled lines of a form, the like, and shaping them for the purpose of clean copy in an application including a pen input interface is known.